﻿package mortal.game.view.shopMall.view
{
    import mortal.game.resource.info.item.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.shopMall.data.*;

    public class ShopSellItem extends BaseItem
    {
        private var _shopItemData:ShopItemData;

        public function ShopSellItem()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.isDragAble = false;
            this.isDropAble = false;
            this.isShowLock = true;
            this._isShowStreng = false;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._shopItemData = null;
            super.disposeImpl(param1);
            return;
        }// end function

        public function get shopItemData() : ShopItemData
        {
            return this._shopItemData;
        }// end function

        public function set shopItemData(param1:ShopItemData) : void
        {
            this._shopItemData = param1;
            this.itemData = new ItemData(this._shopItemData.tShopSell.itemCode);
            if (this._shopItemData.tShopSell && (this._shopItemData.type == 1 || this._shopItemData.tShop.buyType == 1))
            {
                this.isBind = true;
            }
            return;
        }// end function

        public function showIsBind() : void
        {
            this.isBind = ItemsUtil.isBind(itemData);
            return;
        }// end function

    }
}
